// pages/hot/hot.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    info: null,
    imgUrl: ['/public/images/ico/one.png', '/public/images/ico/tow.png', '/public/images/ico/three.png', '/public/images/ico/four.png','/public/images/ico/five.png']
  },

  /**
   * 组件的方法列表
   */
  methods: {
    //获取排名前5的数据
    getData() {
      wx.showLoading({
        title: '加载中',
      })
      wx.cloud.callFunction({
        name:"hot_story"
      }).then(res => {
        this.setData({
          info:res.result.data
        })
        wx.hideLoading()
      })
    }
  },
  lifetimes: {
    attached() {
      this.getData()
    }
  }
})
